/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ipti.br.tag.bo;

import org.ipti.br.tag.dao.PlanFacade;
import org.ipti.br.tag.entity.Plan;
import java.io.Serializable;
import java.util.Calendar;
import java.util.List;
import javax.inject.Inject;
import javax.ejb.Stateless;

/**
 *
 * @author root
 */
@Stateless
public class PlanBO implements Serializable {

    @Inject
    private PlanFacade planDAO;

    public PlanFacade getPlanDAO() {
        return planDAO;
    }

    public void create(Plan plan) {
        getPlanDAO().create(plan);
    }

    public void edit(Plan plan) {
        getPlanDAO().edit(plan);
    }

    public void remove(Plan plan) {
        getPlanDAO().remove(plan);
    }

    public Plan find(Object id) {
        return getPlanDAO().find(id);
    }

    public List<Plan> findAll() {
        return getPlanDAO().findAll();
    }

    public List<Plan> findPlanPerOrganizationUnityDisciplineYear(Long organizationID, Long unityID, Long disciplineID, int year) {
        return getPlanDAO().findPlanPerOrganizationUnityDisciplineYear(organizationID, unityID, disciplineID, year);
    }

    public List<Plan> findPlanPerOrganizationDisciplineYear(Long organizationID, Long disciplineID, int year) {
        return getPlanDAO().findPlanPerOrganizationDisciplineYear(organizationID, disciplineID, year);
    }

    public List<Plan> modifiedPlanBetweenDate(Calendar initialDate, Calendar finalDate, Long serialNumber) {
        return getPlanDAO().modifiedPlanBetweenDate(initialDate, finalDate, serialNumber);
    }
}
